public class EASYPROB {

	/**
	 * @param args
	 */
	public static int getPowerOf2(int num) {
		int count = 0;
		while (num > 1) {
			num = num / 2;
			count++;
		}
		return count;
	}

	public static void main(String[] args) {
		int[] nums = { 8, 9, 10, 137, 1315, 73, 136, 255, 1384, 16385 };
		for (int i = 0; i < nums.length; i++) {
			String s = get2PowString(nums[i]);
			System.out.println(nums[i] + "=" + s.substring(1, s.length() - 1));
		}
	}

	private static String get2PowString(int n) {
		if (n == 0) {
			return "(0)";
		} else if (n == 1) {
			return "";
		} else if (n == 2) {
			return "(2)";
		} else {
			String a = "";
			int pow = 100;
			while (pow > 0 && n > 0) {
				pow = getPowerOf2(n);
				a += "+2" + get2PowString(pow);
				n = n - (1 << pow);
			}
			return "(" + a.substring(1) + ")";
		}
	}
}
